package com.techstar.ats.status;

import java.util.Set;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public enum PlatformStatus implements StatusEnumerated {
	EMERGSTOP(0x00000001, "紧急关闭"),
	TRAINBERTH(0x00000002, "列车停站"),
	CLOSE(0x00000004, "站台关闭，清客"),
	UP_HOLD(0x00000010, "上行方向车站扣车"),
	DOWN_HOLD(0x00000020, "下行方向车站扣车"),
	UP_OCC_HOLD(0x00000040, "上行方向中心扣车"),
	DOWN_OCC_HOLD(0x00000080, "下行方向中心扣车"),
	PSD_OPEN(0x00000100, "屏蔽门开"),
	PSD_CUT(0x00000200, "屏蔽门切除"),
	UP_SKIPSTOP(0x00000400, "上行方向跳停"),
	DOWN_SKIPSTOP(0x00000800, "下行方向跳停"),
	UP_TRAIN_SKIPSTOP(0x00001000, "上行方向指定列车跳停"),
	DOWN_TRAIN_SKIPSTOP(0x00002000, "下行方向指定列车跳停");
	private final int value;
	private final String literal;

	@Override
	public int value() {
		return this.value;
	}

	@Override
	public String literal() {
		return this.literal;
	}

	public static Set<PlatformStatus> valueOf(int mask) {
		return StatusEnumerated.valueOf(PlatformStatus.class, mask);
	}
}
